//
//  DynamicReplayCell.m
//  TuYouAPP
//
//  Created by L on 14-2-24.
//
//

#import "DynamicReplayCell.h"

@implementation DynamicReplayCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}
-(id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self) {
        
    }
    return self;

}
-(void)upDateCell:(NSString *)apub
{
    CGSize constraint = CGSizeMake(295, CGFLOAT_MAX);
    CGSize size = [apub sizeWithFont:[UIFont systemFontOfSize:16] constrainedToSize:constraint lineBreakMode:NSLineBreakByWordWrapping];

    
    CGRect rect = self.replyContent.frame;
    rect.origin.y = 25;
    rect.size.height = size.height +10;
    self.replyContent.frame = rect;
    rect = self.frame;
    rect.size.height = self.replyContent.frame.size.height +self.replyContent.frame.origin.y+5;
    self.frame = rect;

}
-(id)initWithFrame:(CGRect)frame
{
   self =  [super initWithFrame:frame];
    return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
